/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package persistencia;

import java.util.logging.Level;
import java.util.logging.Logger;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

/**
 *
 * @author pgonzalez
 */
public class JpaUtil {
    private static final EntityManagerFactory emf;
    static{
        try{
            emf = Persistence.createEntityManagerFactory("PersistenciaPU");
        }catch(Throwable t){
            System.out.println("Error: " + t);
            t.printStackTrace();
            throw new ExceptionInInitializerError();
        }
    }
    
    public static EntityManagerFactory getEntityManagerFactory(){
        return emf;
    }
}
